package com.xjrsoft.module.customerTwo.EMP.checkin_log.service;

import com.xjrsoft.module.customerTwo.EMP.checkin_log.entity.TElectricCheckinItems;
import com.xjrsoft.module.customerTwo.EMP.checkin_log.entity.TElectricCheckinLog;
import com.xjrsoft.module.customerTwo.EMP.checkin_log.dto.TElectricCheckinLogListDto;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xjrsoft.module.customerTwo.EMP.settlement.entity.TElectricCheckoutSettlementTools;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDateTime;
import java.util.HashSet;
import java.util.List;

/**
 *  服务类
 *
 * @author lisen
 * @since 2023-07-21
 */
public interface ITElectricCheckinLogService extends IService<TElectricCheckinLog> {
	/**
	 * 自定义分页
	 *
	 * @param pageListDto
	 * @return
	 */
	IPage<TElectricCheckinLog> getPageList(TElectricCheckinLogListDto pageListDto);
	@Transactional(rollbackFor=Exception.class)
	boolean add(TElectricCheckinLog tElectricCheckinLog, List<TElectricCheckinItems> tElectricCheckinItemsList) throws Exception;
	@Transactional(rollbackFor=Exception.class)
	boolean checkOut(String id, LocalDateTime dateTime) throws Exception;

	@Transactional(rollbackFor=Exception.class)
	boolean update(String id, TElectricCheckinLog tElectricCheckinLog, List<TElectricCheckinItems> tElectricCheckinItemsList) throws Exception;
	@Transactional(rollbackFor=Exception.class)
	boolean delete(String ids);

	boolean updateRedis();

	boolean confirm(String id);

	@Transactional(rollbackFor=Exception.class)
	HashSet<String> branchImport(List<TElectricCheckinLog> tElectricCheckinLogs);

	List<TElectricCheckinLog> checkinLogList();

    TElectricCheckinLog getInfoById(String id);

	List<TElectricCheckoutSettlementTools> getTElectricCheckinItemsByParentId(String parentId);
}
